﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using LastoRevival.Service.Contracts.Models;

namespace LastoRevival.Service.Contracts
{
	[ServiceContract(Namespace = Constants.ServiceNamespace)]
	public interface IUserService
	{

		[OperationContract]
		LoginAttemptResult Login(Guid loginToken, string username, string password, bool rememberMe);

		[OperationContract]
		void Logout(Guid loginToken);

		[OperationContract]
		bool IsAuthenticated(Guid loginToken);

		[OperationContract]
		CreateUserAttemptResult CreateUser(Guid loginToken, CreateUserModel user);

		[OperationContract]
		void UpdateProfile(Guid loginToken, EditProfileModel user);

		[OperationContract]
		EditProfileModel GetProfileForEdit(Guid loginToken, string username);

		[OperationContract]
		UserProfile GetActiveProfile(Guid loginToken);
		
		[OperationContract]
		ViewUserModel GetPublicProfile(Guid loginToken, string username);

		[OperationContract]
		string GetUsername(Guid loginToken, int userID);
		

		[OperationContract]
		IEnumerable<OnlineUser> GetOnlineUsers(Guid loginToken);

		/// <summary>
		/// 
		/// </summary>
		/// <param name="username"></param>
		/// <param name="messageBodyFormat">This should contain one formatting parameter, which represents where the code should be placed in the body of the email.</param>
		[OperationContract]
		void SendVerificationEmail(Guid loginToken, string username, string messageBodyFormat);

		[OperationContract]
		bool VerifyUser(Guid loginToken, VerifyUserModel user);
	}
}
